<script setup lang="ts">
import { message } from 'ant-design-vue';

// // 获取路由参数
import { useRoute, useRouter } from 'vue-router';

import { authDLY } from '#/api';

const route = useRoute();
const router = useRouter();
const { code } = route.query;
// const jump = false;
if (code) {
  authDLY({ code: code as string }).then(async () => {
    // 跳转页面
    await router.replace({
      path: 'shop-auth-home',
    });
  });
  // message.warning('授权成功');
} else {
  message.warning('授权失败: code不存在');

  router.replace({
    path: 'shop-auth-home',
  });
}
</script>

<template>
  <div class="px-4 py-4">正在授权 请稍候。。。。。</div>
</template>
